# Generated by Django 4.2.10 on 2024-03-17 17:06

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('ads', '0001_initial'),
        ('leads', '0001_initial'),
        ('products', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Contract',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150, verbose_name='Название контракта')),
                ('document', models.FileField(blank=True, null=True, upload_to='documents/', verbose_name='Скан контракта')),
                ('comment', models.TextField(blank=True, null=True, verbose_name='Комментарий')),
                ('cost', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='Стоимость контракта')),
                ('conclusion_day', models.DateField(verbose_name='Дата заключения контракта')),
                ('start_day', models.DateField(verbose_name='Начало действия контракта')),
                ('end_day', models.DateField(verbose_name='Окончание действия контракта')),
                ('ads', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ads.ads', verbose_name='Рекламная кампания')),
                ('lead', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='leads.lead', verbose_name='Клиент')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='products.product', verbose_name='Услуга по контракту')),
            ],
            options={
                'verbose_name': 'контракт',
                'verbose_name_plural': 'контракты',
            },
        ),
    ]
